package com.itheima.day04.myinnerclass.test2;



public class Test {
    public static void main(String[] args) {
        // private 修饰类部类
        // Outer1.Inner oi = new Outer1().new Inner();
        Outer1 o = new Outer1();
        o.method1();

        // static 修饰类部类
        // Outer2.Inner2 oi = new Outer2().new Inner2();
        Outer2.Inner2 oi2 = new Outer2.Inner2();
        oi2.show2();
        oi2.method2();
        Outer2.Inner2.method2();

        // private static 修饰类部类
        Outer3 o3 = new Outer3();
        o3.Outermethod3();


    }
}

class Outer1 {

    private class Inner1 {
        public void show1(){
            System.out.println("Outer1.Inner1.show1()---");
        }
    }

    public void method1(){
       Inner1 i = new Inner1();
       i.show1();
    }

}

class Outer2 {

    static class Inner2 {
        public void show2(){
            System.out.println("Outer2.Inner2.show2()---");
        }
        public static void method2(){
            System.out.println("Outer2.Inner2.method2()---");
        }
    }

}

class Outer3 {

    private static class Inner3 {
        public void show3(){
            System.out.println("Outer3.Inner3.show3()---");
        }
        public static void method3(){
            System.out.println("Outer3.Inner3.method3()---");
        }
    }
    public void Outermethod3(){
        Inner3 i3 = new Inner3();
        i3.show3();
        i3.method3();
        Inner3.method3();
    }

}
